#ifndef T_YOUTUBE_H
#define T_YOUTUBE_H

#include "t_av_common.h"
#include <QtCore>
#include <QtNetwork>

class T_Youtube
{
protected:
    bool m_own_nam;
    QNetworkAccessManager *m_nam;
public:
    T_Youtube(QNetworkAccessManager *a_nam = 0);
    ~T_Youtube();
    QString getVideoStreamMap(QString a_id, QMap<int, QUrl> &a_fmt_map);
protected:
    QByteArray batchGet(const QString &a_url);
    QString getTokenForVideoStreamEmbed(QString a_id, QMap<int, QUrl> &a_fmt_map);
    QString getTokenForVideoStreamDetail(QString a_id, QMap<int, QUrl> &a_fmt_map);
};

#endif // T_YOUTUBE_H
